package com.ruoyi.labsafety.service.impl;

import java.util.stream.Collectors;

import com.ruoyi.common.core.domain.TreeSelect;
import com.ruoyi.labsafety.domain.LabSafetyCheckIndexItem;

/**
 * Treeselect树结构实体类
 * 
 * @author ruoyi
 */
public class TreeSelectCheckItem extends TreeSelect {
	private static final long serialVersionUID = 1L;
	public TreeSelectCheckItem(LabSafetyCheckIndexItem safetyCheckItem) {
		this.setId(safetyCheckItem.getId());
		this.setLabel(safetyCheckItem.getName());
		this.setChildren(safetyCheckItem.getChildren().stream().map(TreeSelectCheckItem::new).collect(Collectors.toList()));
	}
}
